import axiosApi from '../../AxiosApi.js'
const apiList = {
  createTask: {
    method: 'post',
    url: `/api/v1/task`
  },
  taskList: {
    method: 'post',
    url: `/api/v1/task/query`
  },
  taskDetails: {
    method: 'get',
    url: `/api/v1/task/details`
  },
  editTask: {
    method: 'put',
    url: `/api/v1/task`
  },
  deleteTask: {
    method: 'delete',
    url: `/api/v1/task`
  },

}

export default {
  deleteTask (data) {
    return axiosApi({
      ...apiList.deleteTask,
      data
    })
  },
  editTask (data) {
    return axiosApi({
      ...apiList.editTask,
      data
    })
  },
  taskDetails (data) {
    return axiosApi({
      ...apiList.taskDetails,
      data
    })
  },
  taskList (data) {
    return axiosApi({
      ...apiList.taskList,
      data
    })
  },
  createTask (data) {
    return axiosApi({
      ...apiList.createTask,
      data
    })
  },
}
